<%--
  Created by IntelliJ IDEA.
  User: 86158
  Date: 2024/6/23
  Time: 23:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>添加商品</title>
    <link href="https://cdn.jsdelivr.net/npm/quill/dist/quill.snow.css" rel="stylesheet">
    <style>
        body {
            font-family: Arial, sans-serif;
            padding: 20px;
        }

        .form-container {
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
            background-color: #f9f9f9;
        }

        .form-group {
            margin-bottom: 15px;
        }

        label {
            display: block;
            margin-bottom: 5px;
        }

        input[type="text"], input[type="number"], select, textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        input[type="file"] {
            margin-top: 5px;
        }

        input[type="submit"] {
            padding: 10px 20px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        input[type="submit"]:hover {
            background-color: #0056b3;
        }


    </style>
</head>
<body>
<div class="form-container">
    <h2>添加商品</h2>
    <form action="${pageContext.request.contextPath}/AddProduct" method="post" enctype="multipart/form-data">
        <!-- 其他表单项保持不变 -->
        <div class="form-group">
            <label for="productName">商品名称:</label>
            <input type="text" id="productName" name="productName" placeholder="商品名称" required>
        </div>
        <div class="form-group">
            <label for="price">商品价格:</label>
            <input type="number" id="price" name="price" placeholder="商品价格" step="0.01" required>
        </div>
        <div class="form-group">
            <label for="imageUrl">商品图片:</label>
            <input type="file" id="imageUrl" name="imageUrl" accept="image/*" required>
        </div>
        <div class="form-group">
            <label for="inventory">库存数量:</label>
            <input type="number" id="inventory" name="inventory" placeholder="库存数量" required>
        </div>

        <div class="form-group">
            <label for="description">商品描述:</label>
            <textarea id="description" name="description" placeholder="商品描述" rows="4" required></textarea>
        </div>

        <input type="submit" value="添加商品">
    </form>
</div>


</body>
</html>
